<template>
    <el-dialog :visible.sync="dialogVisible" :width="width + 'px'" @close="handleClose" :close-on-click-modal='false'>
        <slot name="title" slot="title"></slot>
        <slot name="body"></slot>
        <slot name="footer" slot="footer"></slot>
        <!-- <span slot="footer" class="dialog-footer">
            <el-button @click="dialogVisible = false" size="mini">取 消</el-button>
            <el-button type="primary" @click="dialogVisible = false" size="mini">确 定</el-button>
        </span> -->
    </el-dialog>
</template>

<script>
    export default {
        data() {
            return {
                dialogVisible: false
            }
        },
        props:{
            width:{
                type:Number,
                default:50
            }
        },
        methods: {
            openDialog(way) {
                this.dialogVisible = true
                this.$emit('getTemplate',way)
            },
            closeDialog() {
                this.dialogVisible = false
            },
            handleClose(){
                this.$emit('handleClose')
            }
        }
    }
</script>

<style lang="less" scoped>
    /deep/ .el-dialog__body{
        padding-bottom: 10px;
        padding-top: 10px;
    }
</style>